﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace APNS.NET.Extensions
{
    public static class DateTimeExtensions
    {
        public static double ToEpochTime(this DateTime dateTime)
        {
            var unixTime = dateTime.ToUniversalTime() - new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
            return unixTime.TotalSeconds;
        }
    }
}
